<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>函数式组件</title>
    <script src="../js/react.development.js"></script>
    <script src="../js/react-dom.development.js"></script>
    <script src="../js/babel.min.js"></script>
</head>
<body>
    <div id="app"></div>
    <script type="text/babel">
        // 1.定义一个组件（函数式）
        function Demo(){
            console.log(this)
            return <h1>这是一个函数式组件（适用于简单组件的定义）</h1>
        }
        // 2.渲染组件到页面
        ReactDOM.render(<Demo/>,document.querySelector('#app'))
    </script>
</body>
</html>